home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_01_02 / 1n02023a < prev    next >
Text File  |  1990-07-08  |  805b  |  24 lines

  1. #include    <stdio.h>
  2.  
  3. /******************************************************************
  4. *    set_pixel - turn on a single point on the laser printer page
  5. *
  6. *    Parameters:
  7. *        x (in) - x coordinate (in dots) of the point
  8. *        y (in) - y coordinate (in dots) of the point
  9. *
  10. *    Notes:
  11. *        1.  Coordinates are relative to 0,0 at the upper left corner
  12. *            of the display page.
  13. *
  14. *    Copyright:
  15. *        Original code by William H. Roetzheim (619) 669-6970
  16. **********************************************************************/
  17.  
  18. void    set_pixel (int x, int y)
  19. {
  20.     fprintf(stdprn, "\033*p%dx%dY", x, y);    /* cursor to x,y posit */
  21.     fprintf(stdprn, "\033*r1A");            /* start raster graphics */
  22.     fprintf(stdprn, "\033*b1W\200");        /* draw one dot */
  23.     fprintf(stdprn, "\033*rB");                /* end raster graphics */
  24. }